package day4;

import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class DateTest {
    public static void main(String[] args) {
        //日期：
        long l = System.currentTimeMillis();
        System.out.println(l);
        Date d=new Date();//当前时间
        System.out.println(d);
        long l2=d.getTime();
        System.out.println(l2);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>");
        System.out.println("年："+d.getYear());
        System.out.println("月："+d.getMonth());
        System.out.println("天："+d.getDate());//从1开始
        System.out.println("周几："+d.getDay());
        System.out.println("过时，时："+d.getHours());//从1开始
    }
}
